home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / utility / opaquemove / install / install-opaquemove < prev   
Text File  |  1996-10-03  |  6KB  |  181 lines

  1. ;;----------------------------------------------------------------------------
  2. ;;
  3. ;; Install-OpaqueMove - OpaqueMove installation script for Installer
  4. ;;
  5. ;; Copyright © 1996 Steve Koren, All Right reserved.
  6. ;;
  7. ;; Use following Icon tooltypes / Command line options:
  8. ;; APPNAME=OpaqueMove
  9. ;; MINUSER=AVERAGE
  10. ;;----------------------------------------------------------------------------
  11.  
  12. (complete 0)
  13.  
  14. (set locale 0)
  15.  
  16. (set #welcome           (cat "Welcome to the " @app-name " installation "
  17.                              "process."))
  18. (set #bad-MUI         (cat "You need at least MUI 3.2 to use " @app-name
  19.                              "2.0."))
  20. (set #bad-OS            (cat "You need at least OS 3.0 to use " @app-name
  21.                              "2.0."))
  22. (set #dir-choice     (cat "Select the directory where the " @app-name
  23.                              " Directory will be created."))
  24.  
  25. (set #copy         (cat "Copying " @app-name "..."))
  26. (set #wbstrt            (cat "Installing " @app-name " in WBStartup"))
  27. (set #diricon           (cat "Installing directory icon..."))
  28. (set #doc-copy         (cat "Copying Documentation..."))
  29. (set #tooltype-prompt   (cat "Setting tooltypes..."))
  30. (set #update            (cat "Updating "))
  31.  
  32. (set #browser-prompt    (cat "The HTML documentation is best read with a web "
  33.                              "browser such as IBrowse which supports "
  34.                              "tables.  Enter a the command used to send a "
  35.                              "URL to your web browser.  A %s will be "
  36.                              "replaced by the URL of the OpaqueMove "
  37.                              "documentation.  For example, for IBrowse you "
  38.                              "might enter\n\n"
  39.                              "Work:IBrowse/IBrowse URL %s"))
  40.  
  41. (set #replbr-prompt     (cat "A browser invocation line already exists.  Do "
  42.                              "you wish to update it?"))
  43.  
  44. (set #wbstart-prompt    (cat "Do you wish to start OpaqueMove each time "
  45.                              "your Amiga boots?  If so, an icon to launch "
  46.                              "OpaqueMove will also be copied to your "
  47.                              "sys:WBStartup directory."))
  48.  
  49. (set #reinst-prompt     (cat "The " @app-name " directory was last "
  50.                              "installed in %s.  Do you "
  51.                              "wish to use this location again?"))
  52.  
  53.  
  54. ;=============================================================================
  55. ; Installation procedure
  56. ;=============================================================================
  57.  
  58. ; -- check for existance of MUI: ---------------------------------------------
  59.  
  60. (welcome #welcome)
  61.  
  62. (if (< (exists "MUI:") 2) ( abort #bad-MUI ) )
  63. (if (< (getversion "exec.library" (resident)) 2555904) (abort #bad-OS))
  64.  
  65. ; -- select our install dir --------------------------------------------------
  66.  
  67. (set LastDir "")
  68. (set OM-Dir  "")
  69.  
  70. (if (exists "ENV:OpaqueMove/OM-Dir")
  71.     ((set LastDir (getenv "OpaqueMove/OM-Dir"))
  72.      (if (not (exists (tackon LastDir "OpaqueMove/OpaqueMove")))
  73.          (set LastDir ""))))
  74.  
  75. (complete 10)
  76. (set Reuse 0)
  77. (if LastDir
  78.     (if (askbool (prompt  (#reinst-prompt LastDir))
  79.                  (help    @askbool-help)
  80.                  (default 1))
  81.         ((set Reuse 1)
  82.          (set OM-Dir (tackon LastDir "OpaqueMove")))))
  83.  
  84. (if (= OM-Dir "")
  85.     (set OM-Dir
  86.          (tackon (askdir (prompt #dir-choice )
  87.                          (help "")
  88.                          (default "SYS:Utilities")
  89.                          (newpath))
  90.                  @app-name)))
  91.  
  92.  
  93. ; -- copy our files into place -----------------------------------------------
  94.  
  95. (complete 20)
  96.  
  97. (set @default-dest OM-Dir)
  98.  
  99. (copyfiles
  100.  (prompt #copy) (help   @copyfiles-help)
  101.  (infos)
  102.  (source "/") (dest OM-Dir)
  103.  (choices "Docs-TXT" "Docs-HTML" "Brushes" "OpaqueMove" "Contrib" "Catalogs"
  104.           "Remove" "ReadMe.MUI" "ReadMe.TXT"))
  105.  
  106. (complete 55)
  107.  
  108. (copyfiles
  109.  (prompt #copy) (help   @copyfiles-help)
  110.  (source "//") (dest (pathonly OM-Dir))
  111.  (choices "OpaqueMove.info"))
  112.  
  113. (complete 58)
  114.  
  115. (tooltype (dest (tackon (pathonly OM-Dir) "OpaqueMove.info"))
  116.                (prompt #diricon)
  117.                (noposition))
  118.  
  119. (complete 60)
  120.  
  121. ; -- install icon in WBStartup if needed & requested -------------------------
  122.  
  123. (if (askbool (prompt  #wbstart-prompt)
  124.              (help    @askbool-help)
  125.              (default 1))
  126.     ((copyfiles (prompt #wbstrt) (help @copyfiles-help)
  127.                 (source "/Icons") (dest "sys:WBStartup")
  128.                 (choices "OpaqueMove.info"))
  129.      (tooltype (dest "sys:WBStartup/OpaqueMove.info")
  130.                (prompt #wbstrt)
  131.                (setdefaulttool (tackon OM-Dir "OpaqueMove"))
  132.                (noposition))))
  133.  
  134. (complete 70)
  135.  
  136.  
  137. ; -- add or update the browser launcher script -------------------------------
  138.  
  139. (set DocLauncher (tackon OM-Dir "Docs-HTML/English/OpaqueDocs"))
  140. (set UpdateLauncher 0)
  141.  
  142. (if (exists DocLauncher)
  143.     (if (askbool (prompt  #replbr-prompt)
  144.                  (help    @askbool-help)
  145.                  (default 1))
  146.         ((delete DocLauncher)
  147.          (set    UpdateLauncher 1)))
  148.   (set    UpdateLauncher 1))
  149.  
  150. (if UpdateLauncher
  151.     ((set LaunchCmd (askstring (prompt #browser-prompt)
  152.                                (help    @askstring-help)
  153.                                (default "Work:IBrowse/IBrowse URL %s")))
  154.      (textfile (dest DocLauncher)
  155.                (append (cat ";!c:execute\n"
  156.                             "stack 64000\n"
  157.                             "set wd `cd`\n"
  158.                             (LaunchCmd "file://localhost/${wd}/Index.html")
  159.                             "\n")))))
  160.  
  161.  
  162. ; -- create env vars ---------------------------------------------------------
  163.  
  164. (complete 80)
  165.  
  166. (makedir "ENV:OpaqueMove")
  167. (makedir "ENVARC:OpaqueMove")
  168.  
  169. (if (exists "ENV:OpaqueMove/OM-Dir")    (delete "ENV:OpaqueMove/OM-Dir"))
  170. (if (exists "ENVARC:OpaqueMove/OM-Dir") (delete "ENVARC:OpaqueMove/OM-Dir"))
  171.  
  172. (textfile (dest (tackon "ENV:OpaqueMove"    "OM-Dir"))
  173.           (append (pathonly OM-Dir)))
  174. (textfile (dest (tackon "ENVARC:OpaqueMove" "OM-Dir"))
  175.           (append (pathonly OM-Dir)))
  176.  
  177.  
  178. (complete 100)
  179.  
  180. (exit)
  181.